package com.hpf.tool.redis.utils;

import com.hpf.tool.redis.interfaces.handle.IHJedisString;
import com.hpf.tool.redis.interfaces.handle.impl.HJedisString;
/**
 * 
 * @author hpf
 *
 */
public final class HJRedisUtil {
	private HJRedisUtil() {}
	private static IHJedisString jedisString;

	public static IHJedisString jedisString() {
		if (jedisString == null) {
			synchronized (IHJedisString.class) {
				if(null == jedisString){
					jedisString = new HJedisString();
				}
				return jedisString;
			}
		}
		return jedisString;
	}

	public static void main(String[] args) {
		IHJedisString string = HJRedisUtil.jedisString();
		string.set("hpf","15829669905",100);
		string.remove("hpf");
		System.out.println("IHJedisString => "+string.get("hpf"));
	}
}
